<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */


/**
 * Smarty string modifier plugin
 *
 * Type:     modifier<br>
 * Name:     string<br>
 * Purpose:  format strings via sprintf
 * @link http://smarty.php.net/manual/en/language.modifier.string.format.php
 *          string (Smarty online manual)
 * @author   Monte Ohrt <monte at ohrt dot com>
 * @param string
 * @param string
 * @return string
 */
function smarty_modifier_string($string, $format)
{
	if( $format == 'show' ) {
		$format = 'string:protect:nl2br:break';
		//return util_string_break(nl2br(util_string_output_protected($string)), 60, '-<br>');
		return nl2br(stripcslashes(util_string_output_protected($string)));
	} else {
		return nl2br($string);
	}
}

/* vim: set expandtab: */

?>
